import http from "@/utils/request";

export default{
    /**
     * 查询列表
     * @param  params 
     * @returns 
     */
    async getList(params){
        return await http.get("/api/scxtrjlsj/list",params);
    },

    // async getsljtzList(pageNo,pageSize,startDate,endDate){
    //     return await http.get("/api/scxtrjlsj/list",{pageNo,pageSize,startDate,endDate});
    // },
    /**
    * 添加
    * @returns
    */
    async add(params){
        return await http.post("/api/scxtrjlsj/add",params)
    },
    /**
    * 修改
    * @returns
    */
    async deleteByObject(params){
        return await http.put("/api/scxtrjlsj/update",params)
    },

    //删除
    async delete(params) {
        return await http.deleteByObject('/api/scxtrjlsj/delete', params);
        
    },

    //上传文件
    async importExcel(myfile){
        // console.log(29999999);
        console.log(myfile.get("myfile"));

        return await http.upload("/api/fileAbout/fileUpload",{myfile})
    },
    //导入文件
    async batchImportExcel(filePath){
        // console.log(typeof(filePath));
        // console.log(filePath.get("filePath"));
        return await http.upload("/api/scxtrjlsj/batchInput",{filePath})
    },
    //下载模板
    async download(params){
        // console.log(1);
        return await http.get("/api/scxtrjlsj/downLoadExcel",params)
    },
}